home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / ad2mac.arc / TEST05.LST < prev    next >
File List  |  1989-08-04  |  9KB  |  191 lines

  1.   Fri Aug  4 1989 10:15                                                                                                  Page    1
  2.  
  3.         Test Program for AD2MAC - 07/25/89
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                2500 A.D. 6805 Macro Assembler  -  Version 4.03a
  10.                ------------------------------------------------
  11.  
  12.                        Input  Filename : test05.asm
  13.                        Output Filename : test05.obj
  14.  
  15.  
  16.     1                                  ttl    Test Program for AD2MAC - 07/25/89
  17.     2                              *  Test Program for AD2MAC Utility
  18.     3                              *  Extracts symbol info from 2500AD cross 6805 assembler
  19.     4                              *  listing file (.LST) and produces HDS-300 compatible
  20.     5                              *  macro file (.MAC) containing local symbol (LS) commands.
  21.     6                              *
  22.     7                              *  BY:  Peter S. Gilmour    25 July 1989
  23.     8                              
  24.     9          0103                control    equ    $103
  25.    10          0080                srmask    equ    $80
  26.    11          0204                fcbase    equ    $204
  27.    12          0040                stmask    equ    $40
  28.    13          00AA                pattern    equ    $aa
  29.    14          0200                shram    equ    $200
  30.    15          0307                jmp1    equ    $307
  31.    16          0323                jmp1_addr equ    jmp1+$1c
  32.    17                              
  33.    18   0000                           .absolute
  34.    19   0050                           org    $50
  35.    20   0050                       count    rmb    1        Command count
  36.    21   0051                           .relative
  37.    22   0200                           org    shram
  38.    23   0200                           rmb    $20
  39.    24   0220                       addr    rmb    2        Command address
  40.    25   0222                       get    rmb    2        Get data address
  41.    26   0224                       data    rmb    80        Command data
  42.    27                                  page
  43.   Fri Aug  4 1989 10:15                                                                                                  Page    2
  44.  
  45.         Test Program for AD2MAC - 07/25/89
  46.  
  47.  
  48.    28                              
  49.    29   0800                           org    $800
  50.    30                              
  51.    31                              * Here for power up/reset:
  52.    32   0800   C6 01 03            start    lda    control
  53.    33   0803   A4 40                   and    #stmask        If not power up, then
  54.    34   0805   27 18                   beq    config        .  enter exec via config cmd!
  55.    35                              
  56.    36                              * Here for self-test:
  57.    37   0807   AE 00               stest    ldx    #0
  58.    38   0809   A6 AA                   lda    #pattern
  59.    39   080B   D7 02 00            st_100    sta    shram,x        Test 1st page of shared ram.
  60.    40   080E   D1 02 00                cmp    shram,x
  61.    41   0811   26 08                   bne    st_err1        Exit if error!
  62.    42   0813   43                      coma            Get inverse pattern
  63.    43   0814   2A F5                   bpl    st_100        and test same location again!
  64.    44   0816   5C                      inx
  65.    45   0817   27 F2                   beq    st_100        Continue until entire page is tested!
  66.    46                              
  67.    47   0819   20 0B                   bra    exec        Enter executive loop.
  68.    48                              
  69.    49                              * Here for self-test error:
  70.    50   081B   A6 02               st_err1 lda    #shram/256
  71.    51   081D   20 FE                   bra    *        Hang the system.
  72.    52                                  page
  73.   Fri Aug  4 1989 10:15                                                                                                  Page    3
  74.  
  75.         Test Program for AD2MAC - 07/25/89
  76.  
  77.  
  78.    53                              
  79.    54                              * Here for config command:
  80.    55   081F   C6 01 03            config    lda    control
  81.    56   0822   C7 02 00                sta    shram
  82.    57   0825   9D                      nop
  83.    58                              * Fall into the exec loop!
  84.    59                              
  85.    60                              * Here for the executive command loop:
  86.    61   0826   9C                  exec    rsp            Reset stack pointer.
  87.    62   0827   C6 01 03                lda    control
  88.    63   082A   AA 80                   ora    #srmask
  89.    64   082C   C7 01 03                sta    control        Yield shared ram to FIM.
  90.    65                              
  91.    66   082F   C6 01 03            ex$wait    lda    control
  92.    67   0832   A4 80                   and    #srmask
  93.    68   0834   26 F9                   bne    ex$wait        Wait for FIM to return shared ram.
  94.    69                              
  95.    70   0836   C6 02 04                lda    fcbase        Get cmd word and verify it, else
  96.    71   0839   26 EB                   bne    exec        .  ignore it!
  97.    72   083B   C6 02 05                lda    fcbase+1
  98.    73   083E   A1 02                   cmp    #maxfc+1
  99.    74   0840   24 E4                   bhs    exec
  100.    75                              
  101.    76   0842   48                      lsla
  102.    77   0843   97                      tax
  103.    78   0844   D6 08 55                lda    ftabl,x        Get addr of proper routine from table
  104.    79   0847   C7 03 23                sta    jmp1_addr    and place into JUMP address due to
  105.    80   084A   D6 08 55                lda    ftabl,x        6805 8-bit index register!
  106.    81   084D   C7 03 24                sta    jmp1_addr+1
  107.    82   0850   CD 03 07                jsr    jmp1        Go execute the command.
  108.    83   0853   20 D1                   bra    exec        Return to exec loop.
  109.    84                              
  110.    85   0855   0859                ftabl    fdb    rduser
  111.    86   0857   0866                    fdb    wruser
  112.    87          0001                maxfc    equ    ((*-ftabl)/2)-1        Maximum legal function code
  113.    88                                  page
  114.   Fri Aug  4 1989 10:15                                                                                                  Page    4
  115.  
  116.         Test Program for AD2MAC - 07/25/89
  117.  
  118.  
  119.    89                              
  120.    90                              * Here for read user memory command:
  121.    91   0859   CD 08 73            rduser    jsr    cmd.init
  122.    92                              
  123.    93   085C   F6                  rduser1 lda    0,x
  124.    94   085D   C7 02 24                sta    data
  125.    95   0860   5C                      inx
  126.    96   0861   3C 50                   inc    count
  127.    97   0863   26 F7                   bne    rduser1
  128.    98                              
  129.    99   0865   81                      rts
  130.   100                              
  131.   101                              * Here for write user memory command:
  132.   102   0866   CD 08 73            wruser    jsr    cmd.init
  133.   103                              
  134.   104   0869   C6 02 24            wruser1 lda    data
  135.   105   086C   F7                      sta    ,x
  136.   106   086D   5C                      inx
  137.   107   086E   3C 50                   inc    count
  138.   108   0870   26 F7                   bne    wruser1
  139.   109                              
  140.   110   0872   81                      rts
  141.   111                              
  142.   112                              * Subr. to init for command execution:
  143.   113   0873   C6 02 20            cmd.init lda    addr
  144.   114   0876   C7 02 22                sta    get
  145.   115   0879   C6 02 21                lda    addr+1
  146.   116   087C   C7 02 23                sta    get+1
  147.   117   087F   81                      rts
  148.   118                              
  149.   119   0880                           end
  150.   Fri Aug  4 1989 10:15                                                                                                  Page    5
  151.  
  152.  
  153. Defined            Symbol Name             Value                References
  154.  
  155.    24    addr                               0220          113    115
  156.   113    cmd.init                           0873           91    102
  157.   Pre    CODE                               0000      
  158.    55    config                             081F           34
  159.     9    control                         =  0103           32     55     62     64     66
  160.    20    count                              0050           96    107
  161.   Pre    DATA                               0000      
  162.    26    data                               0224           94    104
  163.    66    ex$wait                            082F           68
  164.    61    exec                               0826           47     71     74     83
  165.    11    fcbase                          =  0204           70     72
  166.    85    ftabl                              0855           78     80     87
  167.    25    get                                0222          114    116
  168.    15    jmp1                            =  0307           16     82
  169.    16    jmp1_addr                       =  0323           79     81
  170.    87    maxfc                           =  0001           73
  171.   Pre    PAGE0                              0000      
  172.    13    pattern                         =  00AA           38
  173.    91    rduser                             0859           85
  174.    93    rduser1                            085C           97
  175.    14    shram                           =  0200           22     39     40     50     56
  176.    10    srmask                          =  0080           63     67
  177.    32    start                              0800      
  178.    37    stest                              0807      
  179.    12    stmask                          =  0040           33
  180.    39    st_100                             080B           43     45
  181.    50    st_err1                            081B           41
  182.   102    wruser                             0866           86
  183.   104    wruser1                            0869          108
  184.  
  185.  
  186.  
  187.  
  188.            Lines Assembled :  119             Assembly Errors :  0
  189.  
  190.  
  191.